using UnityEngine.EventSystems;

public class UiEquipmentSlot : UiItemSlot
{
    public EquipmentType SlotType;

    public override void OnPointerDown(PointerEventData eventData)
    {
        if (Item == null || Item.data) return;
        Inventory.Instance.UnequipItem(Item.data as ItemDataEquipment);
        Inventory.Instance.AddItem(Item.data as ItemDataEquipment);
        Ui.ItemTooltip.Hide();
        ClearSlot();
    }

    private void OnValidate()
    {
        gameObject.name = $"{SlotType} Slot";
    }
}
